


        Vue.component('v-header',{
            template:`<header>
                <div class="subTip hvc flex flex-justify-content">
                   <p>
                       <i class="icon dc vc">
                           <img src="img/common/suc.png">
                           <img src="img/common/warn.png">
                       </i>
                       <span></span>
                   </p>
               </div>
               <div class="heading">
                   <div class="fluid flex flex-align-items justify-content flex-between">
                       <img src="img/common/logo.png" class="logo">
                       <div class="inpBox flex flex-align-items">       
                           <img src="img/common/search.png" class="logo">
                           <input placeholder="书籍名称、作者、类别..">
                           <p class="search cursor flex flex-align-items flex-justify-content">搜索</p>
                       </div>    
                       <div class="rht flex flex-align-items">
                         <div class="cursor become flex flex-align-items">
                            <img src="img/common/write.png"><p>成为作家</p>
                         </div>
                         <div class="cursor collect flex flex-align-items flex-justify-content">
                            <p>我的收藏</p>
                            <img src="img/common/collect.png">
                         </div>
                         <div class="cursor login">
                            登录
                         </div>
                       </div>
                   </div>
               </div>
               <div class="cates">
                    <div class="fluid flex nowrap flex-align-items">
                        <p class="item cursor" v-for="item in cates">{{item.name}} ({{item.num}})</p>
                    </div>
               </div>
           </header>`,
            data:function(){
                return{
                    cates:[
                        {name:'全部',num:6254},
                        {name:'玄幻',num:3323},
                        {name:'悬疑',num:1323},
                        {name:'苦情',num:2433},
                   ]
                }
            },
            created:function(){
                //nav
                axios.get(dataUrl + 'api/getNavbar',{
                    headers:{
                        Authorization: uuid
                    }
                }).then((res) => {
                    //console.log(res.data.data);
                    this.nav = res.data.data;
                })
                
                axios.post(dataUrl + 'api/getBanner',{identification:'COMMON_ICON'},{
                    headers:{
                      Authorization: uuid
                    }
                })
                .then((res) => {

                })
            }
        });